<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link href="${initParam.url }/statics/css/detail.css" rel="stylesheet">
<script type="text/javascript">
	$(function(){
		$(".file").change(function(){
			$(".img").attr("src",URL.createObjectURL($(this)[0].files[0]));
		
		})
		$("#MyForm").submit(function(){
			if($("#text").val().length<=0){
				$("#error").html("请输入报修内容！")
				return false;
			}
			return true;
		});
	})
	function  tp() {
		
	}

</script>
</head>
<body>
	<div style="width: 1090px;height: 540px;background-color: #FFF;margin: 20px;">
		<h4
			style="background-color: #9FB2C2; padding-left: 10px; color: #516D8A; line-height: 40px;">
			<img alt="" src="${initParam.url}/statics/images/title.jpg">
			详情
		</h4>
		
		<div class="sp">
			<span class="sp-1">请填写报修信息：</span>
			
			<br/>
			<br/>
		
				 <p>真实名字： <span name="">${detail.name }</span></p>
				  <p>房屋地址：${detail.community.communityName} &nbsp;${detail.houseIN} &nbsp; ${detail.tower }</p>
				  <p>手机号码：${detail.phone}</p>
	
			<div class="sp-3">
				<form action="${initParam.url}/owner/docomdetail" id="MyForm"  method="post" enctype="multipart/form-data">
				
				<input type="hidden"  name="communityId" value="${detail.community.id }">
				<input type="hidden"  name="id" value="${detail.id }">
				<p>
					<a href="" id="tp" onclick="tp()">
					<img style="width: 140px;height: 100px;" src="" onerror="this.src='${initParam.url}/statics/images/暂无图片.jpg'" class="img">
					</a>
					</p>
				<p> 图片：<input name="file" type="file" class="file"></p>
				<p>报修内容：</p>
				<textarea name="content" id="text" style="width: 1060px;height: 120px; "></textarea>
				<button type="submit" >提交</button>
				<button type="button" onclick="javascript:history.back(-1);" >取消</button>
				<span id="error" style="color:red"></span>
				</form>
			</div>
		</div>
	</div>
</body>
</html>